#ifndef __CUI_MESSAGEBOX_H__
#define __CUI_MESSAGEBOX_H__

#define CUI_MESSAGEBOX_BUF_LEN      64
#define MESSAGEBOX_MSGLEVEL_INFO                    0
#define MESSAGEBOX_MSGLEVEL_ERROR                   1
#define MESSAGEBOX_MSGLEVEL_FATAL                   2

#define MESSAGEBOX_BUTTON_OK                        0
#define MESSAGEBOX_BUTTON_CANCEL                    1
#define MESSAGEBOX_BUTTON_YES                       2
#define MESSAGEBOX_BUTTON_NO                        3
#define MESSAGEBOX_BUTTON_OKCANCEL                  4
#define MESSAGEBOX_BUTTON_YESNO                     5


struct cui_messagebox_st {
    uint32_t msglevel;      // message level
    uint32_t buttons;       // confirm button types
    char message[CUI_MESSAGEBOX_BUF_LEN];
    int choice;
    int nchoices;
};

int messagebox(uint32_t msglevel, uint32_t buttons, const char* stream, ...);

#endif